<%@page import="tx.bjmdr.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title><%=Infoissue.TABLE_ALIAS%> 维护</title>

	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>

	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</rapid:override>

<rapid:override name="content">
	<form id="queryForm" name="queryForm" action="<c:url value="/pages/Infoissue/mail_list.do"/>" method="post" style="display: inline;">
	<div class="queryPanel">
		<fieldset>
			<legend>搜索</legend>
			<table>
				<tr>
					 
					<td class="tdLabel"><%=Infoissue.ALIAS_INFO_TITLE%></td>
					<td>
						<input value="${query.infoTitle}" id="infoTitle" name="infoTitle" maxlength="200"  class=""/>
					</td>
					<td class="tdLabel"><%=Infoissue.ALIAS_ISSUE_DATE%></td>
					<td>
						<input value="<fmt:formatDate value='${query.issueDateBegin}' pattern='<%=Infoissue.FORMAT_ISSUE_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=Infoissue.FORMAT_ISSUE_DATE%>'})" id="issueDateBegin" name="issueDateBegin"   />
						<input value="<fmt:formatDate value='${query.issueDateEnd}' pattern='<%=Infoissue.FORMAT_ISSUE_DATE%>'/>" onclick="WdatePicker({dateFmt:'<%=Infoissue.FORMAT_ISSUE_DATE%>'})" id="issueDateEnd" name="issueDateEnd"   />
					</td>
			 
					<td class="tdLabel"><%=Infoissue.ALIAS_ATTACHMENT_NAME%></td>
					<td>
						<input value="${query.attachmentName}" id="attachmentName" name="attachmentName" maxlength="200"  class=""/>
					</td>
					
				</tr>
			</table>
		</fieldset>
		<div class="handleControl">
			<input type="submit" class="stdButton" style="width:80px" value="查询" onclick="getReferenceForm(this).action='${ctx}/pages/Infoissue/mail_list.do'"/>
			
			<input type="submit" class="stdButton" style="width:80px" value="新增" onclick="getReferenceForm(this).action='${ctx}/pages/Infoissue/mail_add.do'"/>
			 
		 
		<div>
	</div>

	<div class="gridTable">

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>

		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>

			  <tr>
				<th style="width:1px;"> </th>
				
				<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
				<th sortColumn="info_title" ><%=Infoissue.ALIAS_INFO_TITLE%></th>
				<th sortColumn="issue_date" ><%=Infoissue.ALIAS_ISSUE_DATE%></th>
				<th sortColumn="attachment_name" ><%=Infoissue.ALIAS_ATTACHMENT_NAME%></th>
				<th sortColumn="info_type" ><%=Infoissue.ALIAS_INFO_TYPE%></th>

				<th>操作</th>
			  </tr>

		  </thead>
		  <tbody>
		  	  <c:forEach items="${page.result}" var="item" varStatus="status">

			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td><c:if test="${item.issueDateToCompare==1}" ><img src="images/new.gif"/ height="10" width="30"></c:if>${page.thisPageFirstElementNumber + status.index}</td>
				<td><c:out value='${item.infoTitle}'/>&nbsp;</td>
				<td><c:out value='${item.issueDateString}'/>&nbsp;</td>
				<td><c:out value='${item.attachmentName}'/>&nbsp;</td>
				<td><c:out value='${item.infoTypeString}'/>&nbsp;</td>
				<td>
					<a href="${ctx}/pages/Infoissue/view.do?infoissueId=${item.infoissueId}&">查看</a>&nbsp;&nbsp;&nbsp;
				</td>
			  </tr>

		  	  </c:forEach>
		  </tbody>
		</table>

		<simpletable:pageToolbar page="${page}">
		</simpletable:pageToolbar>
	</div>
	</form>
</rapid:override>

<%-- jsp模板继承,具体使用请查看: http://code.google.com/p/rapid-framework/wiki/rapid_jsp_extends --%>
<%@ include file="base.jsp" %>

